Component({
    properties: {
        data: Object,
        type: {
            type: String
        }
    },
    observers: {
        data: function (data) {
            let img
            if (data.imgs.filter(item => item.type === 1).length) {
                img = data.imgs.filter(item => item.type === 1)[0].content
            } else {
                img = data.imgs[0].content + '?x-oss-process=video/snapshot,t_1,f_jpg,w_300,h_0,m_fast,ar_auto'
            }
            this.setData({
                img: img
            })
        }
    },
    data: {},
    methods: {}
});
